package cn.zyq.charging.user;

import cn.zyq.charging.user.mapper.ChargingUserInfoMapper;
import cn.zyq.charging.user.pojo.dto.ChargingUserInfoDTO;
import cn.zyq.charging.user.pojo.po.ChargingUserInfoPO;
import cn.zyq.charging.user.pojo.po.Gender;
import org.junit.jupiter.api.Test;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
public class ChargingUserTestApp {

    @Autowired
    private ChargingUserInfoMapper chargingUserInfoMapper;

    @Test
    public void getUserBalance(){
        ChargingUserInfoPO chargingUserInfoPO=chargingUserInfoMapper.selectById(1);
        ChargingUserInfoDTO chargingUserInfoDTO=new ChargingUserInfoDTO();
        BeanUtils.copyProperties(chargingUserInfoPO,chargingUserInfoDTO);
        System.out.println(chargingUserInfoDTO);

        //System.out.println(Gender.MAN.name());//MAN

    }
}
